package com.example.loginsystem.service;

import com.example.loginsystem.bean.Message;
import com.example.loginsystem.model.Paging;
import com.example.loginsystem.model.Result;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Cheung0
 * Created on 2021/11/24
 */
@Service
public interface MessageService {

    Result<Message> add(Message message);

    Result<Message> delete(int id);

    Result<Message> update(Message message);

    Result<Message> getById(int id);

    Result<List<Message>> getByUserId(String userId);

    Paging<Message> getByPage(int current, int size);

    List<Message> getAll();

}
